﻿<%@ Page Language="C#" MasterPageFile="~/PortalMaster.Master" AutoEventWireup="true"
    Codebehind="NetApply.aspx.cs" Inherits="Ankin.EHBH.Web.Portal.NetApply" Title="医用耗材管理系统" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphcenter" runat="server">

    <script src="../js/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script src="../js/jquery.flexselect.js" type="text/javascript"></script>

    <script src="../js/liquidmetal.js" type="text/javascript"></script>

    <script src="../js/popup.js" type="text/javascript"></script>

    <script type="text/javascript">
      $(document).ready(function() {
        $("select[class*=flexselect]").flexselect();
        
        
        //获取供应商文本
        $('#ctl00_cphcenter_ddlSupply_flexselect').blur(function() 
        {var tt = $('#ctl00_cphcenter_ddlSupply_flexselect').attr('value');
        $('#ctl00_cphcenter_hdfSupply').attr('value',tt);
        })
        
        //获取产品名
        $('#ctl00_cphcenter_ddlExp_Name_flexselect').blur(function() 
        {var tt = $('#ctl00_cphcenter_ddlExp_Name_flexselect').attr('value');
                    if(tt!="")
            {
            $("#ctl00_cphcenter_ddlExpName2").setSelectedText(tt);
            
            //得到选中索引
            //var index=$("#ctl00_cphcenter_ddlExpName2").getSelectedIndex();
            
            //$("#ctl00_cphcenter_ddlExpName2")[0].options(index).selected = true;
            
            //触发onchang事件
            $("#ctl00_cphcenter_ddlExpName2").change();
        }
        $('#ctl00_cphcenter_hdfExp_Name').attr('value',tt);
        })
        
        /*测试COOKIES*/
        if($.cookie('popupStatus')==1)
        {
            disablePopup();
            centerPopup();
            loadPopup();
        }
        //写Cookies
        $('#wCookies').click(function(){
		$.cookie('name', 'test11213',{expires: 7});				  
		});
		//读Cookies
		$('#rCookies').click(function(){
		var test = $.cookie('popupStatus');
		alert (test);
		});
		
		$('#rCookies1').click(function(){
		var test = $.cookie('popupStatus');
		alert (test);
		});
		//删除
		$('#dCookies').click(function(){
		$.cookie('popupStatus', '0',{expires: 7});							  
		});
		
      });




    </script>

    <table width="650" border="1">
        <tbody>
            <tr>
                <td>
                    医用耗材请领</td>
            </tr>
            <tr>
                <td>
                </td>
            </tr>
            <tr>
                <td style="height: 234px">
                    <table cellspacing="0" cellpadding="0" width="100%" border="1">
                        <tbody>
                            <tr>
                                <td colspan="7">
                                    医用耗材请领信息</td>
                            </tr>
                            <tr>
                                <td style="width: 82px">
                                    产品类别</td>
                                <td style="width: 152px">
                                    <asp:DropDownList ID="ddlPrimClass" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPrimClass_SelectedIndexChanged">
                                    </asp:DropDownList></td>
                                <td style="width: 84px">
                                    二级类别</td>
                                <td style="width: 93px">
                                    <asp:DropDownList ID="ddlSecClass" runat="server" OnSelectedIndexChanged="ddlSecClass_SelectedIndexChanged"
                                        AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                                <td style="height: 45px; width: 34px;" colspan="2">
                                    申请类型&nbsp;</td>
                                <td colspan="1" style="width: 5px; height: 45px">
                                    <asp:DropDownList ID="ddlApply_Type" runat="server" OnSelectedIndexChanged="ddlSecClass_SelectedIndexChanged">
                                    </asp:DropDownList></td>
                            </tr>
                            <tr>
                                <td>
                                    产品名称</td>
                                <td style="width: 152px">
                                    <asp:DropDownList ID="ddlExp_Name" runat="server" AutoPostBack="true" CssClass="flexselect">
                                    </asp:DropDownList>
                                    <div style="display: none">
                                        <asp:DropDownList ID="ddlExpName2" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlExpName2_SelectedIndexChanged">
                                        </asp:DropDownList></div>
                                </td>
                                <td>
                                    规格型号</td>
                                <td style="width: 93px">
                                    <asp:DropDownList ID="ddlSpecs" runat="server">
                                    </asp:DropDownList></td>
                                <td colspan="3">
                                    <asp:Button ID="txtSearch" runat="server" Text="查询" OnClick="txtSearch_Click" /></td>
                            </tr>
                            <tr>
                                <td>
                                    备注</td>
                                <td colspan="6">
                                    <asp:TextBox ID="txtMemo" runat="server" TextMode="MultiLine" Width="98%"></asp:TextBox></td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="hdfStore_Id" runat="server" />
                    <asp:HiddenField ID="hdfBill_Id" runat="server" />
                    <asp:HiddenField ID="hdfApply_Type" runat="server" />
                    <asp:HiddenField ID="hdfDept_Code" runat="server" />
                    <asp:HiddenField ID="hdfApplier" runat="server" />
                    <asp:HiddenField ID="hfdStatus" runat="server" />
                    <asp:HiddenField ID="hdfCreate_Date" runat="server" />
                    <asp:HiddenField ID="hdfOperator" runat="server" />
                    <asp:HiddenField ID="hdfInfo_ID" runat="server" Value="noSelect"></asp:HiddenField>
                    &nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tbody>
                            <tr>
                                <td style="height: 18px">
                                    请领单明细</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:GridView ID="grvApplyDetail" runat="server" AutoGenerateColumns="False" DataKeyNames="INFO_ID"
                                        OnRowCommand="grvApplyDetail_RowCommand" OnRowDataBound="grvApplyDetail_RowDataBound"
                                        OnRowCreated="grvApplyDetail_RowCreated">
                                        <Columns>
                                            <asp:BoundField HeaderText="基本信息号" DataField="INFO_ID" />
                                            <asp:BoundField HeaderText="产品代码" />
                                            <asp:BoundField HeaderText="产品名称" />
                                            <asp:BoundField HeaderText="规格型号" />
                                            <asp:BoundField HeaderText="产品分类" />
                                            <asp:BoundField HeaderText="批发价" />
                                            <asp:BoundField HeaderText="建议零售价" />
                                            <asp:BoundField HeaderText="单位" />
                                            <asp:TemplateField HeaderText="申请数量">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtQuan" runat="server" OnKeyPress="if(((event.keyCode>=48)&&(event.keyCode <=57) )) {event.returnValue=true;} else{event.returnValue=false;}"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="添加" ShowHeader="False">
                                                <ItemTemplate>
                                                    <asp:Button ID="btnAdd" CommandName="btnAddname" runat="server" CausesValidation="false"
                                                        Text="添加" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="height: 19px">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnSaveApply" runat="server" Text="保存请领单" OnClick="btnSaveApply_Click">
                    </asp:Button>
                    <asp:Button ID="btnCancel" runat="server" Text="清空"></asp:Button>
                    <asp:Label ID="lblVaildsave" runat="server" ForeColor="Red"></asp:Label>
                    &nbsp;&nbsp;
                    <br />
                    <asp:HiddenField ID="hfdInfo_Id" runat="server" />
                    <asp:HiddenField ID="hdfExp_Code" runat="server" />
                    <asp:HiddenField ID="hdfExp_Name" runat="server" Value="noSelect" />
                    &nbsp;&nbsp;
                </td>
            </tr>
        </tbody>
    </table>
</asp:Content>
